package cn.learn.dubbo3.enhance.controller;

import cn.learn.dubbo3.enhance.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Desc
 * @Author XieWei
 * @Date 2022/1/26 11:35
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("/getUsername")
    public String getUsername(@RequestParam("uid")String uid){
        return userService.getUserName(uid);
    }

}
